import request from '@/utils/request'
import type { ResponseData } from '../type'

// 用户信息管理

// 性别统计
export const consumerSexCountApi = () => request.get<any, ResponseData>('/consumer/sexCount')

// 状态统计
export const consumerStatusCountApi = () => request.get<any, ResponseData>('/consumer/statusCount')

// 查询全部用户信息
export const consumerFindAllApi = () => request.get<any, any>('/consumer')

// 条件查询params参数
export const consumerFindBySearchApi = (params: any) => request.get<any, any>('/consumer/search', { params })

// 删除
export const consumerDeleteApi = (id: string) => request.delete<any, any>('/consumer/' + id)

// 新增or修改
export const consumerSaveApi = (consumer: any) => request.post<any, any>('/consumer', consumer)
